﻿package gui.hug; 

  import flash.display.Sprite;
  import flash.text.TextField;
  import flash.events.MouseEvent;
    
  /**
   * @author Alexey Kharkov
   */
class LabelButton extends HUGSprite
  {
    private var txt:TextField;
    
    public function new( label:String, x:Int, y:Int )
    {	
	  super();
      txt = Utils.addText( x, y, 0, 11, label );
      addChild( txt );
      
      buttonMode = true;
      mouseChildren = false;
    }
    
    public function getLabel():String
    {
      return txt.text;
    }
    
    public function setLabel( s:String )
    {
      Utils.setText( txt, s );
    }
  }
